package com.pro.common.service.sitecontent.controller;

import com.pro.common.api.enums.init.EnumCurrency;
import com.pro.common.service.sitecontent.model.db.Currency;
import com.pro.common.api.sitecontent.model.db.CurrencyExchangeRate;
import com.pro.common.api.sitecontent.model.dto.CurrencyExchangeRateKey;
import com.pro.common.service.sitecontent.service.CurrencyExchangeRateService;
import com.pro.common.service.sitecontent.service.CurrencyService;
import com.pro.framework.api.util.CollUtils;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/user/currencyExchangeRate")
public class CurrencyExchangeRateController {

    @Autowired
    private CurrencyExchangeRateService service;

    @Operation(summary = "批量更新汇率")
    @GetMapping("/getRateMapMap")
    public Map<EnumCurrency, Map<EnumCurrency, BigDecimal>> getRateMapMap() {
        return service.getRateMapMap();
    }


}
